// 书写首页的 css样式
// 在index.less中导入common.less文件
@import "common.css";

// body 样式
body {
    min-width: 320px;
    width: 15rem;
    margin: 0 auto;
    line-height: 1.5;
    font-family: Arial, Helvetica, STHeiTi,sans-serif;
    background: #f2f2f2;
}
// 后续的尺寸都需要使用 rem 单位
@baseFont:50px;
// top-banner 区域
.top-banner {
    position: relative;
    width: (750rem / @baseFont);
    height: (100rem / @baseFont);
    .top-banner-img {
        display: block;
        width: 100%;
        height: 100%;
        img {
            display: block;
            width: 100%;
        }
    }
    .close {
        position: absolute;
        z-index: 1;
        width: 1rem;
        height: 1rem;
        top: 0.5rem;
        left: 0.1rem;
        background: url(../images/close.png) no-repeat center center;
        background-size: (30rem / @baseFont);
    }
    
}

// header 区域
.header {
    width: (750rem / @baseFont);
    height: (180rem / @baseFont);
    background: #ffdb47;
    .header-top {
        display: flex;
        width: (682rem / @baseFont);
        height: (88rem / @baseFont);
        padding: 0 (34rem / @baseFont);
        justify-content: space-between;
        align-items: center;
        .classify {
            img {
            display: block;
            width: (36rem / @baseFont);     
            height: (60rem / @baseFont);           
            }
        }
        .ad {
            img {
                display: block;
                width: (450rem / @baseFont);
                height: (55rem / @baseFont);
                margin-right: (50rem / @baseFont);
            }
        }
        .login {
            img {
                display: block;
                width: (36rem / @baseFont);
                height: (60rem / @baseFont);
            }
        }
    }
    .search {
        position: relative;
        width: (750rem / @baseFont);
        height: (92rem / @baseFont);
        padding: 0 (24rem / @baseFont);
        box-sizing: border-box;
        a {
            position: absolute;
            top: 0;
            left: (24rem / @baseFont);
            width: (702rem / @baseFont);
            height: (88rem / @baseFont);
            // background-color: pink;
        }
        i {
            position: absolute;
            left: (42rem / @baseFont);
            top: (26rem / @baseFont);
            width: (36rem / @baseFont);
            height: (36rem / @baseFont);
            background: url(../images/search_btn.png) no-repeat 0 0;
            background-size: (36rem / @baseFont);
        }
        form {
            display: flex;
            width: (702rem / @baseFont);
            height: (88rem / @baseFont);
            align-items: center;     
            // background: pink;     
            input {
                width: (702rem / @baseFont);
                height: (64rem / @baseFont);
                padding: (3rem / @baseFont)  (20rem / @baseFont)  0  (65rem / @baseFont);
                border: 0;
                border-radius: (32rem / @baseFont);
                box-sizing: border-box;
                font-size: 0.56rem;
                line-height: (64rem / @baseFont);
            }

        }
    }
}

// banner 区域
.banner {
    width: (750rem / @baseFont);
    height: (260rem / @baseFont);
    background: url(../images/banner_bg.png) no-repeat 0 0;
    background-size: (750rem / @baseFont);
    .wrapper {
        position: relative;
        width: (702rem / @baseFont);
        height: (260rem / @baseFont);
        margin: 0 auto;
        // background-color: pink;
        overflow: hidden;
        ul {
            position: relative;
            width: (2000rem / @baseFont);
            height: (260rem / @baseFont);
            margin: 0;
            list-style: none;
            li {
                position:absolute;
                left: (702rem / @baseFont);
                top: 0;
                width: (702rem / @baseFont);
                height: (260rem /@baseFont);
                border-radius: (24rem / @baseFont);
                overflow: hidden;
                &.current {
                    left: 0;
                }
                img {
                    width: (702rem / @baseFont);
                    height: (260rem / @baseFont);
                }
            }
        }
        ol {
            position: absolute;
            display: flex;
            align-items: center;
            justify-content: center;
            list-style: none;
            left: 50%;
            bottom: .24rem;
            transform: translate(-50%);
            padding: 0;
            margin: 0;
            width: (208rem / @baseFont);
            height: (8rem / @baseFont);
            li {
                width: (9rem / @baseFont);
                height: (8rem / @baseFont);
                background-color: rgba(0, 0, 0, 0.3);
                border-radius: (8rem / @baseFont);
                margin: 0 0.08rem;
            }
            .current {
                width: (18rem / @baseFont);
                background-color: #fff;
            }
        }
    }
}

// nav 区域
.nav {
    width: (750rem / @baseFont);
    height: (308rem / @baseFont);
    a {
        float: left;
        width: (150rem / @baseFont);
        height: (142rem / @baseFont);
        text-decoration: none;
        color: #666;
        font-size: (22rem / @baseFont);
        img {
            display: block;
            width: (84rem / @baseFont);
            height: (84rem / @baseFont);
            margin: (24rem / @baseFont) (33rem / @baseFont) 0;
        }
        p {
            height: (28rem / @baseFont);
            line-height: (28rem / @baseFont);
            margin-top: (5rem / @baseFont);
            text-align: center;
        }
    }
}

// newfloor区域
.newfloor {
    display: flex;
    width: 100%;
    align-items: center;
    height: 4.5rem;

}
.newfloor img {
    display: block;
    height: 4.68rem;
}
.newfloor img:nth-child(n+2) {
    margin-left: 2px;
}

// 推荐榜单
.recommended-title {
    color: #333;
    font-size: (24rem / @baseFont);
}
.Recommended-l {
    display: flex;
    justify-content: center;
}
.Recommended-list {
    position: relative;
    width: 4.52rem;
    height: 5.3rem;
    border-radius: .24rem;
    background-color: #fff;
}
.Recommended-list:nth-child(n + 2) {
    margin-left: .3rem;
}
.Recommended-list .bgc-img {
    position: absolute;
    bottom: 0;
    width: 100%;

}
.Recommended-list .pro-img {
    display: block;
    width: 3rem;
    height: 3rem;
    margin: .3rem auto 0;
}

.Recommended-list span {
    position: absolute;
    display: block;
    height: .68rem;
    min-width: 2rem;
    max-width: 4rem;
    left: 50%;
    top: 3.1rem;
    text-align: center;
    color: #D9A87A;
    line-height: .68rem;
    border: .04rem solid #D9A87A;
    border-radius: .34rem;
    transform: translate(-50%);
    font-size: .44rem;
    box-sizing: border-box;
    background-color: #fff;
}
.Recommended-list .Recommend-tip {
    position: absolute;
    bottom: 0.2rem;
    width: 100%;
    text-align: center;
    font-size: .52rem;
}
.Recommended-list .Recommend-tip p {
    color: #fff;
    margin: 0;
    padding: 0;
    height: .64rem;
    line-height: .64rem;
}
.Recommended-list .Recommend-tip p:nth-child(2) {
    opacity: .8;
}

.bd-box {
    display: flex;
    width: 14.04rem;
    margin: 0 auto;
    flex-wrap: wrap;
    margin-top: 12px;
    justify-content: space-between;
    border-radius: .24rem;
    background-color: #fff;
    overflow: hidden;

}
.bd-box .bd-two {
    display: flex;
    flex-wrap: wrap;
}
.bd-box .bd-two .bd-two-item {
    box-sizing: border-box;
    width: 7rem;
    height: 4.8rem;
    line-height: 1.5;
    background-color: #fff;
    border-right: 1px solid #f2f2f2;
    overflow: hidden;
    padding: .42rem 0 .32rem .36rem;
}
.bd-box .bd-two .bd-two-item:nth-child(even) {
    border-right: 0;
}
.bd-box .bd-two .bd-two-item .bd-band {
    display: flex;
    align-items: center;
}
.bd-box .bd-two .bd-two-item span:nth-child(1) {
    display: block;
    font-size: .52rem;
    color: #333;
}
.bd-box .bd-two .bd-two-item span:nth-child(2) {
    display: block;
    background-color: #faf5eb;
    border-radius: .56rem;
    height: .56rem;
    line-height: .56rem;
    font-size: .44rem;
    color: #ab813a;
    margin-left: .24rem;
    padding:0 .24rem;


}
.bd-box .bd-two .bd-two-item p {
    margin: 0;
    padding: 0;
    font-size: .48rem;
    color: #999;
}
.bd-box .bd-two .bd-two-item .bd-hang {
    display: flex;
}
.bd-box .bd-two .bd-two-item .bd-hang img {
    display: block;
    width: 2.8rem;
    height: 2.8rem;
}

// 猜你喜欢部分
.like-list {
    width: 15rem;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    background-color: #F7F7F7;
}
.like-list .like-title{
    display: block;
    width: 14.04rem;
    height: 1.2rem;
}
.like-list .like-item {
    height: 10.84rem;
    width: 6.64rem;
    line-height: .72rem;
    padding: 0 0 .28rem 0;
    margin: 0 .12rem;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: .24rem;
    margin-bottom: .36rem;
    background-color: #FFF;
    color: #333;
}
.like-list .like-item img {
    width: 6.84rem;
    height: 6.84rem;
    border-radius: .24rem .24rem 0 0;
}
.like-list .like-item p {
    margin: .36rem auto 0;
    width: 6.36rem;
    height: 1.34rem;
    font-size: .52rem;
    line-height: .68rem;
    font-weight: bold;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.like-list .like-item .cuxiao-tag {
    display: flex;
    width: 5.38rem;
    margin: .22rem .24rem .48rem;
    height: .48rem;
    overflow: hidden;
    flex-wrap: wrap;
}
.like-list .like-item .cuxiao-tag .like-discount {
    margin: 0 .06rem .04rem .04rem;
    border-radius: .12rem;
    height: .48rem;
    padding: .04rem .24rem;
    line-height: .4rem;
    font-size: .36rem;
    box-sizing: border-box;
    border: 1px solid #FFBB00;
    background: #FEFBEE;
}
.like-list .like-item .like-price {
    margin: 0;
    padding: 0;
    font-size: .72rem;
    height: .72rem;
    line-height: .72rem;
    color: #FF4422;
    font-weight: bold;
}
.like-list .like-item .like-number {
    margin: 0;
    padding: 0;
    color: #999999;
    margin-left: .26rem;
    font-weight: normal;
    font-size: .4rem;
}